# 商品类
class Commodity(object):
    def __init__(self, name="", category="", img="", link=""):
        self.name = name
        self.category = category
        self.img = img
        self.link = link


# 商品配置
commodities = {
    "笔记本电脑": [
        Commodity(
            "MacBook Pro",
            "笔记本电脑",
            "https://www.apple.com.cn/v/mac/home/by/images/overview/select/product_tile_mbp_14_16__bkl8zusnkpw2_large.png",
            "https://item.jd.com/100074524434.html",
        ),
        Commodity(
            "HUAWEI MateBook X Pro",
            "笔记本电脑",
            "https://res.vmallres.com/pimages//uomcdn/CN/pms/202403/gbom/6942103117480/428_428_3B943B45EB5100A5B792D5E1F9FD6576mp.png",
            "https://item.jd.com/100104373646.html",
        ),
        Commodity(
            "HUAWEI MateBook 14",
            "笔记本电脑",
            "https://res2.vmallres.com/pimages/uomcdn/CN/pms/202405/gbom/6942103124914/428_428_7D7D2A40B13DD15850BDCE0FC71E3BB5mp.png",
            "https://item.jd.com/100110556636.html",
        ),
    ],
    "手机": [
        Commodity(
            "华为pura70ultra",
            "手机",
            "https://img12.360buyimg.com/n1/s450x450_jfs/t1/245613/19/7667/45915/6620b1aeF9862de39/449b0b12279aacd1.jpg",
            "https://item.jd.com/10100880632097.html",
        ),
        Commodity(
            "华为mate60pro",
            "手机",
            "https://img11.360buyimg.com/n1/s450x450_jfs/t1/196397/32/36626/55096/64f0540fFec558f44/531dc373dede216c.jpg",
            "https://item.jd.com/100066921033.html",
        ),
        Commodity(
            "苹果 iPhone 15 Pro Max",
            "手机",
            "https://img11.360buyimg.com/n1/s450x450_jfs/t1/97729/14/27814/53911/66680cc4Fff0f4a80/1f9c0492019b8617.jpg",
            "https://item.jd.com/100068388451.html",
        ),
    ],
    "键盘": [
        Commodity(
            "ikbc W200工业灰无线键盘机械键盘",
            "键盘",
            "https://img13.360buyimg.com/n1/s450x450_jfs/t1/161128/31/41370/181839/65b1dd01F4a69cb8d/bb8236c609302b62.png",
            "https://item.jd.com/100007507053.html",
        ),
        Commodity(
            "ROG夜魔机械键盘 无线/蓝牙",
            "键盘",
            "https://img14.360buyimg.com/n1/s450x450_jfs/t1/183905/31/38929/119090/650bb3d3Fa5637d1b/299387234ed25c17.jpg",
            "https://item.jd.com/100067759754.html",
        ),
        Commodity(
            "罗技（Logitech）K835机械键盘",
            "键盘",
            "https://img12.360buyimg.com/n1/s450x450_jfs/t1/123777/7/37751/62607/64bf5ca0F573a4849/919f7892807a0317.jpg.avif",
            "https://item.jd.com/100028648542.html",
        ),
    ],
    "鼠标": [
        Commodity(
            "罗技（G）G102 游戏鼠标",
            "鼠标",
            "https://img10.360buyimg.com/n1/s450x450_jfs/t1/109159/34/12534/282164/5e994335E69c3ec01/c386f87bde1a2d5e.jpg",
            "https://item.jd.com/100012720890.html",
        ),
        Commodity(
            "华为蓝牙鼠标(第二代)青春版",
            "鼠标",
            "https://img13.360buyimg.com/n1/s450x450_jfs/t1/200295/40/40462/23051/6551c85fF6bf6f229/7cd86d929cf6a32f.jpg",
            "https://item.jd.com/100036633828.html",
        ),
        Commodity(
            "VGN 蜻蜓F1MOBA 有线/无线",
            "鼠标",
            "https://img12.360buyimg.com/n1/jfs/t1/205372/15/36949/30055/6659ad34F8c209692/9122e45437cee1d0.jpg",
            "https://item.jd.com/10077137753807.html",
        ),
    ],
    "书": [
        Commodity(
            "张朝阳的物理课 ",
            "书",
            "https://img12.360buyimg.com/n1/jfs/t1/180750/40/35305/149207/64db2cb5Fd5833bbd/4a70b0910fd89b01.jpg",
            "https://item.jd.com/13821227.html",
        ),
        Commodity(
            "我的世界观（世界科普名著译丛）",
            "书",
            "https://img13.360buyimg.com/n1/jfs/t1/106977/24/43147/21370/650aaa1fF8dc9949b/712e7fb258e7302b.jpg",
            "https://item.jd.com/13927578.html",
        ),
        Commodity(
            "张朝阳：重新出发",
            "书",
            "https://img14.360buyimg.com/n1/jfs/t18577/190/2611074369/280960/21bb265/5afe5b57Nc92f67b6.jpg",
            "https://item.jd.com/12362844.html",
        ),
    ],
    "杯子": [
        Commodity(
            "彩致（CAIZHI）304不锈钢马克杯带盖",
            "杯子",
            "https://img13.360buyimg.com/n1/jfs/t1/164027/38/38034/86229/6637550bF64c8f2ce/4022c5a52331337c.jpg",
            "https://item.jd.com/100050648373.html",
        ),
        Commodity(
            "FGA富光马克保温杯",
            "杯子",
            "https://img13.360buyimg.com/n1/jfs/t1/197398/1/2048/148761/610e345cE48fd931d/1a39ea64a53d3756.jpg",
            "https://item.jd.com/100024633158.html",
        ),
        Commodity(
            "叁旬（sanxun） 知行陶瓷泡茶马克杯",
            "杯子",
            "https://img14.360buyimg.com/n1/jfs/t1/29704/24/18783/53512/63315e01Ef25dcbec/2b02ad9c37a029c0.jpg",
            "https://item.jd.com/10061541092789.html",
        ),
    ],
    "椅子": [
        Commodity(
            "墨例（Mouurriy）电脑椅办公椅子升降转椅",
            "椅子",
            "https://img14.360buyimg.com/n1/jfs/t1/188490/3/360/522266/6088d8b2E2e507e51/00f19dfd29202f5a.jpg",
            "https://item.jd.com/10030066132884.html",
        ),
        Commodity(
            "朗域轩品人体工学电竞椅",
            "椅子",
            "https://img11.360buyimg.com/n1/jfs/t1/163832/13/45344/166147/6662b1f8F43716bd1/600a1ca9476afae9.jpg",
            "https://item.jd.com/10100252501976.html",
        ),
        Commodity(
            "VWINPER电脑椅家用人体工学椅子",
            "椅子",
            "https://img10.360buyimg.com/n1/jfs/t1/185332/30/45998/102126/664caa55F3f9b2916/ef7542ce68324858.jpg",
            "https://item.jd.com/10038191428600.html",
        ),
    ],
}

if __name__ == "__main__":
    import json
    data = commodities
    str = json.dumps({"status": 200, "message": "ok", "data": data}, default=lambda o: o.__dict__, ensure_ascii=False)
    print(str)
